<? 
	session_start();
	require("connect.php");	
	$khoilop=$_POST["khoilop"];
	$mamh=$_POST["mamh"];
	$magv=$_POST["magv"];
	$lop=$_POST["lop"];
	$cahoc=$_POST["cahoc"];			
	$phonghoc=$_POST["phonghoc"];
	$ngay=$_REQUEST["demol1"];
	$sqldate = strtotime($ngay);
	$date = date('Y-m-d', $sqldate);		
	$sql="insert into khoahoc(khoilop,mamh,magv,lop,cahoc,phonghoc,ngaykg) values('{$khoilop}','{$mamh}','{$magv}','{$lop}','{$cahoc}','{$phonghoc}','{$date}')";	
	mysql_query("$sql") or die("Error!");
	mysql_close();
	header("Location:khoahoc_admin.php");
	
?>